import request from '@/utils/http'

/**
 * 获取角色列表
 * @param params
 */
export function getRoleList(params: any) {
	return request.get<Http.BaseResponse>({
		url: '/api/role',
		params: params
	})
}

/**
 * 创建角色
 * @param params
 */
export function createRole(params: any) {
	return request.post<Http.BaseResponse>({
		url: '/api/role',
		params: params,
		showSuccessMessage: true,
	})
}

/**
 * 更新角色
 * @param params
 */
export function updateRole(params: any) {
	return request.put<Http.BaseResponse>({
		url: '/api/role',
		params: params,
		showSuccessMessage: true,
	})
}